package net.googlecode.demenkov.services;

import net.googlecode.demenkov.domains.Friendship;
import net.googlecode.demenkov.domains.Person;

/**
 * Service for actions with friendships
 *
 * @author Demenkov Yura
 */
public interface FriendshipService {

    /**
     * Creates friendship
     *
     * @param friendship
     */
    public void createFriendship(Friendship friendship);

    /**
     * Confirmes friendship
     *
     * @param friendship
     */
    public void confirmFriendship(Friendship friendship);

    /**
     * Deletes friendship
     *
     * @param friendship
     */
    public void deleteFriendship(Friendship friendship);

    /**
     * Gets friendship by two persons
     *
     * @param personWhoSend person who proposed friendship
     * @param personWhoGet  person who confirmed friendship
     * @return friendship or null if there are no such friendship
     */
    public Friendship findFriendshipByPersons(Person personWhoSend, Person personWhoGet);
}
